package net.hserver.sync.controller.system.config;

import cn.hserver.core.ioc.annotation.Autowired;
import cn.hserver.core.server.util.JsonResult;
import cn.hserver.plugin.web.annotation.Controller;
import cn.hserver.plugin.web.annotation.GET;
import cn.hserver.plugin.web.annotation.POST;
import net.hserver.sync.entity.SyncWebDavConfigEntity;
import net.hserver.sync.service.SyncWebDavService;

@Controller("/sync/system/syncWebDavConfig/")
public class SyncWebDavController {

    @Autowired
    private SyncWebDavService syncWebDavService;

    @POST("add")
    public JsonResult add(SyncWebDavConfigEntity webDavConfigEntity) {
        return JsonResult.ok().put("data",syncWebDavService.add(webDavConfigEntity));
    }

   @GET("list")
    public JsonResult list() {
        return JsonResult.ok().put("data",syncWebDavService.list());
    }

    @GET("del")
    public JsonResult del(String id) {
        return JsonResult.ok().put("data",syncWebDavService.del(id));
    }

}
